package com.daoeping.data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Cop_contactref entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "cop_contactref", catalog = "daoeping")
public class Cop_contactref implements java.io.Serializable {

	// Fields

	private Integer id;
	private Bsc_address bsc_address;
	private Cop_companyinfo cop_companyinfo;

	// Constructors

	/** default constructor */
	public Cop_contactref() {
	}

	/** full constructor */
	public Cop_contactref(Bsc_address bsc_address,
			Cop_companyinfo cop_companyinfo) {
		this.bsc_address = bsc_address;
		this.cop_companyinfo = cop_companyinfo;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "adress_id", nullable = false)
	public Bsc_address getBsc_address() {
		return this.bsc_address;
	}

	public void setBsc_address(Bsc_address bsc_address) {
		this.bsc_address = bsc_address;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "corp_id", nullable = false)
	public Cop_companyinfo getCop_companyinfo() {
		return this.cop_companyinfo;
	}

	public void setCop_companyinfo(Cop_companyinfo cop_companyinfo) {
		this.cop_companyinfo = cop_companyinfo;
	}

}